<div class="crumb-wrap">
    <div class="crumb-list"><i class="icon-font"></i><a href="<?=site_url('admini') ?>">首页</a><span class="crumb-step">&gt;</span><span>密码修改</span></div>
</div>
<div class="result-wrap">
    <div class="result-content">
        <form action="<?=site_url('shops/suser/reset_password')?>" method="post" id="myform" name="myform" enctype="multipart/form-data">
            <table class="insert-tab" width="100%">
                <tbody>
                    <tr>
                        <th><i class="require-red">*</i>原始密码：</th>
                        <td>
                            <input class="common-text required" id="title" name="password" size="50" value="" type="password">
                        </td>
                    </tr>
                    <tr>
                        <th><i class="require-red">*</i>修改密码：</th>
                        <td>
                            <input class="common-text required" id="title" name="password1" size="50" value="" type="password">
                            <span id="mess">*密码长度为6-20位，区分大小写</span>
                        </td>
                    </tr>
                    <tr>
                        <th><i class="require-red">*</i>确认密码：</th>
                        <td>
                            <input class="common-text required" id="title" name="password2" size="50" value="" type="password">
                        </td>
                    </tr>
                    <tr>
                        <th></th>
                        <td>
                            <input class="btn btn-primary btn6 mr10" value="提交" type="submit">
                            <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button">
                        </td>
                    </tr>
                </tbody></table>
        </form>
    </div>
</div>

<script>
    $('#myform').submit(function() {
        $(this).ajaxSubmit(function(data){
            if(data == 1){
                layer.alert('修改成功！请重新登陆！',{
                    icon:1,
                },function(){
                    location.reload(true);
                });
            }else{
                layer.alert(data,{
                    icon:2,
                });
            }
        })
        return false;
    })
</script>